package com.ivc.rule.action;

import java.util.List;

import javax.annotation.Resource;

import com.cs.framework.ui.bo.UIData;
import com.cs.framework.web.annotation.Action;
import com.cs.framework.web.annotation.Mapping;
import com.ivc.rule.dto.base.BusinessTypeDto;
import com.ivc.rule.service.BusinessTypeService;

/**
 * 业务类型
 * 
 * @author hedongzhou
 * 
 */
@Action("businessType")
public class BusinessTypeAction {

	@Resource
	private BusinessTypeService businessTypeService;

	/**
	 * 查询所有有效的业务类型
	 */
	@Mapping
	public Object queryAll() {
		BusinessTypeDto businessTypeDto = new BusinessTypeDto();
		businessTypeDto.setValid("Y");

		List<BusinessTypeDto> list = businessTypeService.query(businessTypeDto);

		return new UIData(list, list.size());
	}

}
